package com.aiit.carinsurance2.service.impl;



import com.aiit.carinsurance2.dao.UserDao;
import com.aiit.carinsurance2.pojo.Pay;
import com.aiit.carinsurance2.pojo.Toubaodan;
import com.aiit.carinsurance2.pojo.User;
import com.aiit.carinsurance2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hfy
 * @since 2022-05-06
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public User queryByLoginnameAndPassword(String loginname, String password) {
        return userDao.queryByLoginnameAndPassword(loginname,password);
    }

    @Override
    public int regist(User user) {
        return userDao.regist(user);
    }

    @Override
    public int updateuserinfo(User user) {
        return userDao.updateuserinfo(user);
    }

    @Override
    public User querybyid(int id) {
        return userDao.querybyid(id);
    }

    @Override
    public User querybyloginname(String loginname) {
        return userDao.querybyloginname(loginname);
    }

    @Override
    public Toubaodan querybyuid(Integer uid) {
        return userDao.querybyuid(uid);
    }

    @Override
    public int insert(Pay pay) {
        return userDao.insert(pay);
    }

    @Override
    public Pay querypayinfo(Integer uid) {
        return userDao.querypayinfo(uid);
    }
}
